vgic: refuse irq migration when one is already in progress
authorStefano Stabellini <sstabellini@kernel.org>
Wed, 5 Apr 2017 20:28:43 +0000 (13:28 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 6 Apr 2017 23:16:04 +0000 (16:16 -0700)
commit91ef7364933037b6a8d825405a1c809a72e6152f
tree04fefbe4e9e2be96bbee698084fb789e5699e48a
parent31bc6a93a096bab21211e0e2c7c284ee4aec5402
vgic: refuse irq migration when one is already in progress

When an irq migration is already in progress, but not yet completed
(GIC_IRQ_GUEST_MIGRATING is set), refuse any other irq migration
requests for the same irq.

This patch implements this approach by returning success or failure from
vgic_migrate_irq, and avoiding irq target changes on failure. It prints
a warning in case the irq migration fails.

It also moves the clear_bit of GIC_IRQ_GUEST_MIGRATING to after the
physical irq affinity has been changed so that all operations regarding
irq migration are completed.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/gic.c
xen/arch/arm/vgic-v2.c
xen/arch/arm/vgic-v3.c
xen/arch/arm/vgic.c
xen/include/asm-arm/vgic.h